﻿@model Turismo.Areas.GestionRuta.Models.BuscarRutaModel

@{
    ViewBag.Title = "Buscar Ruta";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Buscar Ruta</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Scripts/jquery-ui-1.8.12.custom/development-bundle/themes/base/jquery.ui.all.css")"
    rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.12.custom/development-bundle/jquery-1.5.1.js")" type="text/javascript"></script>	
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.12.custom/development-bundle/ui/jquery.ui.core.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.12.custom/development-bundle/ui/jquery.ui.widget.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.12.custom/development-bundle/ui/jquery.ui.mouse.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.12.custom/development-bundle/ui/jquery.ui.slider.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("#slider-vertical").slider({
            orientation: "vertical",
            range: "min",
            min: 0,
            max: 100,
            value: 60,
            slide: function (event, ui) {
                $("#ImportanciaTiempo").val(ui.value);
            }
        });
        $("#ImportanciaTiempo").val($("#slider-vertical").slider("value"));
    });
	</script>


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <table>
        <tr>
            <td>
                <fieldset>
                    <legend>Tipos de transporte</legend>                       
                        <div class="editor-field">
                            <ul>
                                @foreach (var item in Model.TiposDeTransporte) {
                                    <li><input type="checkbox" name="TransporteIds" value="@item.Id"/> @item.Descripcion</li>
                                }
                            </ul>
                        </div>                
                </fieldset>          
            </td>
           
            
            <td>
                <fieldset>
                    <legend>Cabecera Destino</legend>                    
                    <div class="editor-field">
                        @Html.DropDownList("CabeceraFinalId", Model.ListaCabeceraFinal, "Seleccione una centro", Model.CabeceraFinalId)
                        <br />
                        @Html.ValidationMessageFor(model => model.CabeceraFinalId) 
                    </div>    
                </fieldset>  
                 <fieldset>
                    <legend>Cabecera Origen</legend>                    
                    <div class="editor-field">
                        @Html.DropDownList("CabeceraInicialId", Model.ListaCabeceraInicial, "Seleccione una centro", Model.CabeceraInicialId)
                        <br />
                        @Html.ValidationMessageFor(model => model.CabeceraInicialId) 
                    </div>    
                </fieldset>       
            </td>
             <td>
                <fieldset>
                    <legend>Numero de pasajeros</legend>                    
                    <div class="editor-field">
                        @Html.EditorFor(model => model.NumeroDePasajeros)
                        @Html.ValidationMessageFor(model => model.NumeroDePasajeros)
                    </div> 
                </fieldset>        
            </td>
            <td>
                 <fieldset>    
                    <legend>Elija la priorización en los costos</legend>                    
                       
                    <table>
                        <tr>
                            <td rowspan="2">
                                <div id="slider-vertical" style="height:200px;"></div>
                            </td>          
                            <td>
                                Dinero <br />
                            </td>  
                            <td rowspan="2">
                                <div class="editor-field">
                                    @Html.TextBoxFor(a => a.ImportanciaTiempo, new { style = "width:25px;" })  %Dinero                                  
                                </div> 
                            </td>                                              
                        </tr>
                        <tr>
                            <td>
                            Tiempo
                            </td>
                        </tr>
                    </table>
                 </fieldset>   
            </td>
        
        </tr>
        <tr>
            <td colspan="2">           
                <input type="submit" value="Buscar Ruta" />            
            </td>
        </tr>
    
    </table> 
    
    
     <div id="mapa" onclick="init()">
        @Html.Partial("MapRespuesta")
     </div>    
    
}


